package com.qst.itoffer.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageBean<T> {
    private int pageNo;
    private int pageSize;
    private int totalRecords;
    private int totalPages;
    private List<T> data;

    public boolean hasPreviousPage() {
        return this.pageNo > 1;
    }

    public boolean hasNextPage() {
        return pageNo < totalPages;
    }
}
